Skip to content

Conversation

@namasikanam
Copy link
Collaborator

@namasikanam namasikanam commented Dec 1, 2025

Another example for eHoare (done with @mzini). This example considers a nested loop which uniformly samples a boolean matrix of size $n \times m$, and proves that the probably of sampling any boolean matrix of size $n \times m$ is no more than $2 ^ {- n \times m}$.

My original purpose for this example was to figure out a game hopping in a big proof, but it turned out that this game hopping is not needed. But I think this is a good example for demonstrating how to do proof in eHoare.

MM45 and others added 19 commits January 30, 2026 15:29
A comprehensive example covering most functionality and features
can be found in `examples/docgen/docgenbasic.ec`

In short, the command-line syntax is as follows:
`easycrypt docgen [-outdir <output-directory>] <source-file>`
add tests for conseq equiv phoare
* reduce in t_hF_or_bhF_or_eF
* add reduction in call tactic
All code that relates to module replacement is now usused and has
been removed.
This commit makes the warning flags now explicit for the dev/ci
environments and use the same set of warning flags for both of them.
This will allow us to catch more warnings in the CI.

For the release environment, we now use the default set of flags.

As a side effect, this commit fixes the pretty printing of local
variables (the actual code was not using the printing environment
anymore to get the display name)
Currently, if the top-assumption is not an hypothesis, we
let an low-tactic error message do escape. We now write a
proper error message before this happens.
Check modules in types + properly classify declared modules as declared
ECO version is now 4.

The trace field is optional. The -trace command line option triggers
the trace recording in the generated .eco file.
The second goal generated from byehoare is unsound, in
which the procedure arguments are bound in a free memory.

This is a small bug introduced in #789 . We need to use
the default memory (hr) of the program.
This logic is deliberately slightly less expressive than the one it
replaces, which does not hinder usability in any cryptographic context,
with the hope that it is simpler to maintain and verify.
strub and others added 7 commits January 30, 2026 15:29
Uses Sphinx + an extension that generates proofs viewable and navigable
directly in the browser.
The spelling 'instanciate' is only acknowledged in the Wiktionary, while
all other dictionaries prefer the spelling with a 't'.

ex.: https://dictionary.cambridge.org/dictionary/english/instantiate
…ports

fix: perform positivity check in type arguments of type constructors
test: add a simple test file for positivity checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants